package com.cn.spjdbc.generator;

import java.sql.DatabaseMetaData;
import java.sql.ResultSet;

import javax.sql.DataSource;

import com.cn.spjdbc.ColumnNameTransform;

public class GenerateTools {
	public static void getnerate(DataSource dataSource,String pack,String tableName) throws Exception{
		DatabaseMetaData dbMeta = dataSource.getConnection().getMetaData();
		ResultSet tableSet = dbMeta.getTables(null, "%", "qbank", new String[]{"TABLE"});
		while(tableSet.next()){
			System.out.println(ColumnNameTransform.replaceUnderlineAndfirstToUpper(tableSet.getString("TABLE_NAME"), "_", ""));
		}
	}
}
